package com.lancoo.znbkxx.teacher.aibkTestCoach.questionToEvaluation.aibkQuesEvalutionGCT


import android.annotation.SuppressLint
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.lancoo.znbkxx.teacher.R
import com.lancoo.znbkxx.teacher.aibkTestCoach.networkRequest.entity.ItemEva
import com.lancoo.znbkxx.teacher.utils.HtmlUtils
import kotlinx.android.synthetic.main.item_gct_analysis.view.*

/**
 * Created by wealive on 2021/3/18.
 *
 *
 */
class QuesGctAdapter(data: List<ItemEva>) : BaseQuickAdapter<ItemEva, BaseViewHolder>(data) {
    init {
        mLayoutResId = R.layout.item_gct_analysis
    }

    @SuppressLint("SetTextI18n")
    override fun convert(helper: BaseViewHolder, item: ItemEva?) {
        with(helper.itemView) {
            tv_stuAnswer.text = "${item?.ItemSortIndex}."
            tv_answer.text = HtmlUtils.setText(item?.ItemAnswer!!.replace("$/", "或"))
            tv_analyze.text = HtmlUtils.setText(
                    item.ItemAnalysis.let { if (it.isBlank()) "...略" else it })
        }
    }
}